Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests #2726

Merged
merged 1 commit into from
Jan 11, 2022
Merged

Fix tests #2726

merged 1 commit into from
Jan 11, 2022

Conversation

fabio-ivona
Copy link
Contributor

@fabio-ivona fabio-ivona commented Jan 11, 2022

This PR will fix the "beforeEach already exist" error in pest test suite

Can't test the code, though (have not an S3 for testing)

my only fear is that you couldn't call Pest's getS3BaseTestDirectory() directly from S3TestPathGenerator.php, but the main issue is that S3IntegrationTest class was autoloaded by composer in S3TestPathGenerator.php and it looked into S3IntegrationTest.php triggering beforeEach() a second time

@fabio-ivona fabio-ivona changed the base branch from main to v10 January 11, 2022 14:55
@freekmurze freekmurze merged commit 8688b72 into spatie:v10 Jan 11, 2022
@freekmurze
Copy link
Member

Thank you!

freekmurze added a commit that referenced this pull request Jan 14, 2022
* wip

* wip

* Fix styling

* wip

* Fix styling

* wip

* Fix styling

* wip

* wip

* wip

* PHPUnit to Pest Converter (#2724)

* Add Pest dependencies

* Add base Pest file

* Convert test cases

* Remove non-compound imports

* Adopt expectation API

* Optimize uses

* Set return type of base TestCase methods

From the [PHPUnit 8 release notes][1], the `TestCase` methods below now declare a `void` return type:

- `setUpBeforeClass()`
- `setUp()`
- `assertPreConditions()`
- `assertPostConditions()`
- `tearDown()`
- `tearDownAfterClass()`
- `onNotSuccessfulTest()`

[1]: https://phpunit.de/announcements/phpunit-8.html

* Use Pest test runner

* Shift cleanup

* Fix styling

* wip

* wip

* wip

* wip

* wip

* Fix styling

Co-authored-by: Shift <[email protected]>
Co-authored-by: freekmurze <[email protected]>

* wip

* Fix styling

* wip

* wip

* wip

* Fix styling

* wip

* wip

* wip

* wip

* wip

* Fix styling

* test fix (#2726)

* wip

* wip

* wip

* wip

* Fix styling

* wip

* wip

* wip

* wip

* Fix styling

* wip

* wip

Co-authored-by: freekmurze <[email protected]>
Co-authored-by: Shift <[email protected]>
Co-authored-by: Fabio Ivona <[email protected]>
@fabio-ivona fabio-ivona deleted the fix-tests branch January 15, 2022 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants